Bug 626499 - GtkClipboard unnotified on change of OS X pasteboard owner
authorMichael Natterer <mitch@gimp.org>
Tue, 4 Dec 2012 13:31:13 +0000 (14:31 +0100)
committerMichael Natterer <mitch@gimp.org>
Tue, 4 Dec 2012 13:42:08 +0000 (14:42 +0100)
commitf08fc1274141a0e631687de12246409881ec2454
treeb2dde2bc6b3d2e27e8f7d32fc53889de1c3b1c94
parentc74d79bb552533d6aa4934f9a0fed4f191ef88cb
Bug 626499 - GtkClipboard unnotified on change of OS X pasteboard owner

pasteboardChangedOwner is not called as reliably as we'd want to get it,
so keep track of [pasteboard changeCount] and drop clipboard ownership
when a change happened. Also better unset the clipboard content redundantly
in a few places rather than missing one, and reorder the code in
gtk_clipboard_set_contents() so that the new aggressive unsetting
won't unset the clipboard under our feet when we call
[pasteboard declareTypes].
(cherry picked from commit f2b74db5dcbd28a1e27431f413c66d2a5d50b2bd)
gtk/gtkclipboard-quartz.c